package cn.hwh.springframework.beans.factory.support;

import cn.hwh.springframework.beans.factory.config.BeanDefinition;

import java.lang.reflect.Constructor;

/**
 * @author wenhao hu
 * @title: InstantiationStrategy
 * @projectName mini-spring
 * @description: TODO
 * @date 2022/1/2415:21
 */
public interface InstantiationStrategy {
    /**
     * 实例化策略接口，cglib、jdk通过实现这个接口来创造一个被设置了属性的实例对象
     * @param beanDefinition
     * @param beanName
     * @param constructor
     * @param objects
     * @return
     */
    Object instantiate( BeanDefinition beanDefinition, String beanName, Constructor constructor,Object[] objects);
}
